package cate.game.play.buff.h;

import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.action.ctx.ActionCtx;

/**
 * 立即降低20%命中1回合和12%伤害减免2回合，下回合眩晕1回合
 */
public class 沙暴BH extends BuffHandler {

	private int 延迟回合;

	private int 眩晕buff;

	//延迟回合=1&眩晕buff=？？
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		延迟回合 = args.getInt("延迟回合", 0);
		眩晕buff = args.getInt("眩晕buff", 0);
	}

	@Override
	public void onRoundBegin(ActionCtx action) {
		if (action.getRound().index == buff.roundAdd + 延迟回合) {
			buff.owner.buff.tryAddByTid(action, buff.caster, 眩晕buff);
		}
	}
}
